﻿<?php
$Name 		= $_POST['_Name'];
$Gender  	= $_POST['_Gender'];
$Birthday 	= $_POST['_Birthday'];
$Address	= $_POST['_Address'];
$Salary 	= $_POST['_Salary'];
$Warehouse	= $_POST['_Warehouse'];

echo 'Finish!!</br><a href="viewPage.php"> return to the view page.</a></br>';

$link=mysql_connect("localhost", "root" ,"1123");
mysql_select_db("dd") or die("No database");

$query = "insert into staff(name, gender, birthday, address, salary, warehouse_name)  
		  values('".$Name."' , '".$Gender."' , date'".$Birthday."' , '".$Address."' , $Salary , '".$Warehouse."')";

mysql_query($query) or die("Error Message:".mysql_error());

mysql_close ($link);

?>